<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置 - 单词学习应用</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="../css/main.css">
</head>
<body>
    <div class="app-container">
        <div class="statusbar"></div>
        
        <div class="app-content">
            <!-- 设置头部 -->
            <div class="mb-6 flex items-center">
                <a href="profile.html" class="mr-3 text-gray-600">
                    <i class="fas fa-arrow-left text-lg"></i>
                </a>
                <h1 class="app-title">设置</h1>
            </div>
            
            <!-- 账号设置 -->
            <h2 class="text-sm font-medium text-gray-500 mb-2 px-1">账号</h2>
            <div class="card mb-6">
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-user"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">个人资料</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-lock"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">账号安全</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-bell"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">通知设置</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
            </div>
            
            <!-- 学习设置 -->
            <h2 class="text-sm font-medium text-gray-500 mb-2 px-1">学习设置</h2>
            <div class="card mb-6">
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-graduation-cap"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">每日学习目标</div>
                        <div class="list-item-subtitle">50个单词</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-clock"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">学习提醒时间</div>
                        <div class="list-item-subtitle">每天 20:00</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-volume-up"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">发音设置</div>
                        <div class="list-item-subtitle">美式英语</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-sync"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">复习间隔</div>
                        <div class="list-item-subtitle">艾宾浩斯遗忘曲线</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
            </div>
            
            <!-- 应用设置 -->
            <h2 class="text-sm font-medium text-gray-500 mb-2 px-1">应用设置</h2>
            <div class="card mb-6">
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-moon"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">深色模式</div>
                    </div>
                    <div class="relative inline-block w-10 mr-2 align-middle select-none">
                        <input type="checkbox" id="toggle-theme" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
                        <label for="toggle-theme" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
                    </div>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-language"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">语言</div>
                        <div class="list-item-subtitle">简体中文</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-font"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">字体大小</div>
                        <div class="list-item-subtitle">中</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-download"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">离线词库</div>
                        <div class="list-item-subtitle">管理已下载的词库</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
            </div>
            
            <!-- 其他设置 -->
            <h2 class="text-sm font-medium text-gray-500 mb-2 px-1">其他</h2>
            <div class="card mb-6">
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-question-circle"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">帮助与反馈</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-info-circle"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">关于</div>
                        <div class="list-item-subtitle">版本 1.0.0</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
                
                <div class="list-item">
                    <div class="list-item-icon">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <div class="list-item-content">
                        <div class="list-item-title">隐私政策</div>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </div>
            </div>
            
            <!-- 退出登录按钮 -->
            <div class="mt-8 mb-6">
                <button class="w-full py-3 text-center text-red-500 font-medium bg-white rounded-lg shadow">
                    退出登录
                </button>
            </div>
        </div>
    </div>
    
    <script src="../js/main.js"></script>
    <script>
        // 设置页面专用脚本
        document.addEventListener('DOMContentLoaded', function() {
            const platform = getPlatform();
            const theme = getTheme();
            const container = document.querySelector('.app-container');
            const toggleTheme = document.getElementById('toggle-theme');
            
            // 更新容器类
            if (container) {
                container.classList.add(platform);
                
                if (theme === 'dark') {
                    container.classList.add('dark');
                    toggleTheme.checked = true;
                }
            }
            
            // 更新图标类
            const icons = document.querySelectorAll('.list-item-icon');
            icons.forEach(icon => {
                icon.classList.add(platform === 'ios' ? '' : 'android');
            });
            
            // 主题切换事件
            toggleTheme.addEventListener('change', function() {
                const newTheme = this.checked ? 'dark' : 'light';
                
                // 更新当前URL的主题参数
                const url = new URL(window.location.href);
                url.searchParams.set('theme', newTheme);
                window.location.href = url.toString();
            });
            
            // 更新返回链接
            const backLink = document.querySelector('a[href="profile.html"]');
            if (backLink) {
                backLink.href = `profile.html?platform=${platform}&theme=${theme}`;
            }
        });
    </script>
    
    <style>
        /* 开关样式 */
        .toggle-checkbox:checked {
            right: 0;
            border-color: #68D391;
        }
        .toggle-checkbox:checked + .toggle-label {
            background-color: #68D391;
        }
        .toggle-checkbox {
            right: 0;
            z-index: 5;
            transition: all 0.3s;
        }
        .toggle-label {
            transition: all 0.3s;
        }
    </style>
</body>
</html> 